import os

ENV = os.environ.get("LOGNAME")
DB_PASSWORD = {
    "sunxianyong": "123456"
}


class DefaultConfig():
    SECRET_KEY = "dafasdgadfsadsfdsafadsdasfadsf"
    SQLALCHEMY_DATABASE_URI = ""
    SQLALCHEMY_ECHO = True
    SQLALCHEMY_TRACK_MODIFICATIONS = False
    JSON_AS_ASCII = False


class DevConfig(DefaultConfig):
    password = DB_PASSWORD.get(ENV, "030703")
    SQLALCHEMY_DATABASE_URI = f"mysql+pymysql://root:{password}@127.0.0.1:3306/dream"


RESPONSE_CODE = {
    200: "操作成功",
    405: "登录失败",
    444: "余额不足",
}

